Safeguard of H3Event body stream locking in edge runtime workaround #1521
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
https://github.com/solidjs/solid-start/blob/main/packages/start/src/runtime/server-handler.ts#L136
There's currently a workaround for edge runtimes to create a new Request object instead of using the current one.
What is the new behavior?
Add a safeguard for the edge runtime workaround when a stream is already locked to not create the new Request object.
Other information
My goal is to make Solid Start work 100% on the Azure Functions runtime. I currently have a PR open at Nitro to support the latest Azure Function runtime.
However there's currently an issue that the H3 event body stream is already locked when it gets to the part of the edge runtime workaround when running on Azure Functions, which causes issues with server actions.
Im happy to say that all Solid Start functionality seems to work on Azure Functions once we get around this locking issue.